package top.infopub.generic;


import java.io.Serializable;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;


/**
 * 顶级的实体类，所有的实体类必须实现该类
 * @author Awoke
 * @version 2018年9月13日
 * @see GenericEntity
 * @since
 */
public class GenericEntity implements Serializable {

    private static final long serialVersionUID = -2724584234993060771L;

    @Override
    public boolean equals(Object obj) {
        return EqualsBuilder.reflectionEquals(this, obj);
    }

    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

}
